<?php use_helper('I18N') ?>
<h1>Employees List</h1>

<table>
  <thead>
    <tr>
      <!--<th>Id</th>-->
      <th class="sf_admin_date sf_admin_list_th_mapdate">
         <?php include_partial('global/sortableHeader', array('fieldname' => 'id',
            'fieldlabel' => 'Id' ,'routename' => '@employee', 'sort' => $sort)) ?>
      </th>
      <th class="sf_admin_date">
        <?php include_partial('global/sortableHeader', array('fieldname' => 'lastname',
            'fieldlabel' => 'Name' ,'routename' => '@employee', 'sort' => $sort)) ?>
      </th>
      <th class="sf_admin_date">
        <?php include_partial('global/sortableHeader', array('fieldname' => 'nationalId',
            'fieldlabel' => 'National Id' ,'routename' => '@employee', 'sort' => $sort)) ?>
      </th>
      <th class="sf_admin_date">
        <?php include_partial('global/sortableHeader', array('fieldname' => 'socialsecurityid',
            'fieldlabel' => 'Social Security' ,'routename' => '@employee', 'sort' => $sort)) ?>
      </th>
      <th>Active</th>
      <th>
        <?php include_partial('global/sortableHeader', array('fieldname' => 'dateofbirth',
            'fieldlabel' => 'Date of Birth' ,'routename' => '@employee', 'sort' => $sort)) ?>
      </th>
      <th>Age</th>
      <th>Gender</th>
      <th>Updated at</th>
      <th>Updated by</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($pager->getResults() as $i => $employee): ?>
   <tr class="<?php echo fmod($i, 2) ? 'even' : 'odd' ?> dataList">
      <td><a href="<?php echo url_for('employee/show?id='.$employee->getId()) ?>"><?php echo $employee->getId() ?></a></td>
      <td><?php echo $employee->getName() ?></td>
      <td><?php echo $employee->getNationalId() ?></td>
      <td><?php echo $employee->getSocialSecurityId() ?></td>
      <td><?php echo $employee->getActive() ?></td>
      <td><?php echo $employee->getDateOfBirth() ?></td>
      <td><?php echo $employee->getAge() ?></td>
      <td><?php echo $employee->getGender() ?></td>
      <td><?php echo $employee->getUpdatedAt() ?></td>
      <td><?php echo $employee->getUpdater() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<?php include_partial('global/pagination', array('pager' => $pager, 'module' => 'employee')) ?>
<a href="<?php echo url_for('employee/new') ?>">New</a>
